//
//  TGCitySection.m
//  GroupBuy
//
//  Created by wwj on 15/11/3.
//  Copyright © 2015年 wwj. All rights reserved.
//

#import "TGCitySectionModel.h"
#import "MJExtension.h"
#import "TGCityModel.h"

@implementation TGCitySectionModel

-(void)setCities:(NSMutableArray *)cities{
    
    if (![[cities lastObject] isKindOfClass:[NSDictionary class]]) {
        _cities = cities;
        return;
    }
    
    NSMutableArray *array = [NSMutableArray array];
    for (NSDictionary *dict in cities) {
        TGCityModel *city = [TGCityModel objectWithKeyValues:dict];
        [array addObject:city];
    }
    _cities = array;
}
@end
